<%@ page language="java" import="java.util.*,com.taobao.top.demo.dataobject.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>" />

    <title>
      添加属性图片
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
    <meta http-equiv="description" content="This is my page" />
    <style type="text/css">
      body { background-color:#fff; color:#48b9ef; padding:10px 0 10px 0; font-family: Arial, Helvetica, sans-serif;
      font-size: 13px; text-align:center; }
    </style>
  </head>
  <jsp:useBean id="getItemPropValues" class="com.taobao.top.demo.getData.GetItemPropValues" scope="request">
  </jsp:useBean>
  <body>

    <%
    String iid = request.getParameter("iid");
    String cid = request.getParameter("cid");
    %>
    <form 
        action="operation/updateImgServlet"
        id="updateImgForm"
        name="updateImgForm"
        method="post"
        enctype="multipart/form-data"
    >

      <input type="hidden"  name="iid" value="<%=iid %>"/>
      <input type="hidden"  name="cid" value="<%=cid %>"/>
      <input type="hidden"  name="vid" id="vid" value="3232483"/>
      颜色列表：
      <select size="1" id="select" name="select" onchange="document.getElementById('vid').value = this.value;">
        <%
        List<PropValue> propValues = getItemPropValues.getPropValue(cid);
        for(int i = 0; i < propValues.size(); i++ ){
          PropValue propValue = propValues.get(i);
          %>
          <option value="<%=propValue.getVid() %>">
            <%=propValue.getName() %>
          </option>
          <%
        }
        %>
      </select>
      颜色别名：
      <input type="text" name="nameAlias" id="nameAlias" />
      上传图片：
      <input type="file" name="imgPath" id="imgPath" />
      <input type="submit" name="updateImg" id="updateImg" value="提交" />
    </form>
  </body>
</html>
